package basic_syntax

/**
 * Using if as an expression:
 */
fun minOf(a: Int, b: Int) = if (a < b) a else b

fun maxOf(a: Int, b: Int): Int {
    if (a > b) {
        return a
    } else {
        return b
    }
}

fun main(args: Array<String>) {
    println(maxOf(1, 2))
    println(minOf(2, 4))
}